package com.cnhis.drgs.common;

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//


import com.cnhis.drgs.annotation.Description;

public interface ResponseCode {
    int getCode();

    String getMsg();

    @Description("基础公共返回码(0-99)")
    public static enum Common implements ResponseCode {
        SUCCESS(0, "请求成功"),
        ERROR(1, "请求失败"),
        TIMEOUT(2, "请求超时"),
        NULL_POINTER(3, "空指针"),
        NULL(10, "参数为空"),
        CANNOT_PARSE(11, "参数无法解析"),
        REQUEST_FORMAT_ERROR(12, "请求格式错误"),
        FORMAT_ERROR(13, "参数格式错误"),
        LACK(14, "缺少必要参数"),
        METHOD_ERROR(15, "方法使用错误"),
        DATA_DUPLICATE(20, "数据重复，请检查后再提交"),
        DATA_INVALID(21, "数据超过有效范围或不合法"),
        NO_LOGIN(90, "未登录或者登录超时"),
        OTHER_LOGIN(91, "账号异地登录"),
        NO_AUTH(92, "权限不足"),
        ILLEGAL(98, "非法请求"),
        SYSTEM_ERROR(99, "系统繁忙，请稍候再试"),
        CUSTOM_ERROR(100, "${msg}");

        private int code;
        private String msg;

        private Common(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return this.code;
        }

        public String getMsg() {
            return this.msg;
        }
    }
}
